Skip to content

Exclude hidden-column scores from leaderboard and submission APIs - #2526

Open
ihsaan-ullah wants to merge 2 commits into
developfrom
hidden-column-scores
Open

ihsaan-ullah wants to merge 2 commits into
developfrom
hidden-column-scores

Conversation

@ihsaan-ullah

@ihsaan-ullah ihsaan-ullah commented Aug 29, 2026

Copy link
Copy Markdown
Collaborator

Description

Scores for columns organizers mark as hidden were still visible to anyone viewing a leaderboard or submission, even though they were correctly hidden from the leaderboard table itself. Hidden scores are now excluded everywhere, for every type of user. Added tests to cover this going forward.

Issues this PR resolves

  • reported by Wenhao Deng

A checklist for hand testing

  • test that submission api and leaderboard api do not return hidden column scores

Checklist

  • Code review by me
  • Hand tested by me
  • I'm proud of my work
  • Code review by reviewer
  • Hand tested by reviewer
  • CircleCi tests are passing
  • Ready to merge

@wlln
wlln requested a review from IdirLISN September 1, 2026 12:20
@wlln wlln added the P1 High priority label Sep 1, 2026
@IdirLISN IdirLISN removed their assignment Sep 8, 2026
@Didayolo
Didayolo force-pushed the hidden-column-scores branch from 71c9b9e to 4e17fe3 Compare September 15, 2026 13:51
@Didayolo

Didayolo commented Sep 15, 2026

Copy link
Copy Markdown
Member

@ihsaan-ullah @IdirLISN

=========================== short test summary info ============================
FAILED src/apps/api/tests/test_submissions.py::HiddenColumnSubmissionScoreTests::test_anonymous_user_does_not_see_hidden_column_score_in_submission_detail - assert 404 == 200
FAILED src/apps/api/tests/test_submissions.py::HiddenColumnSubmissionScoreTests::test_anonymous_user_does_not_see_hidden_column_score_in_submission_list - assert 0 == 1
===== 2 failed, 266 passed, 2 skipped, 2349 warnings in 360.90s (0:06:00) ======

Those two tests assume anonymous users can read finished leaderboard submissions, which #2536 (already on develop) removed. Anonymous denial is now covered by the tests at test_submissions.py#L263 and test_submissions.py#L392, so these two are obsolete.

Scores for columns organizers mark as hidden were still visible to
anyone viewing a leaderboard or submission, even though they were
correctly hidden from the leaderboard table itself. Hidden scores are
now excluded everywhere, for every type of user. Added tests to cover
this going forward.
@Didayolo
Didayolo force-pushed the hidden-column-scores branch from 4e17fe3 to 603b6c5 Compare September 15, 2026 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P1 High priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants